﻿#pragma once

#include <QWidget>
#include "ui_base64Cfgclass.h"
#include <QElapsedTimer>

#include <QSize>
#include <iostream>
#include <QPixmap>
#include <QDragEnterEvent>
#include <QDropEvent>
#include <QMimeData>
#include <QFileInfo>
#include <QMessageBox>
#include <QResizeEvent>

class Base64Cfgclass : public QWidget
{
	Q_OBJECT

public:
	Base64Cfgclass(QWidget *parent);
	~Base64Cfgclass();

private slots:
	void showTime(qint64 size1, qint64 size2);
	void on_btnOpen_clicked();
	void on_btnClear_clicked();

	void on_btnImageToBase64_clicked();
	void on_btnBase64ToImage_clicked();

	void on_btnTextToBase64_clicked();
	void on_btnBase64ToText_clicked();
private:
	Ui::base64cfgClassClass ui;
	QElapsedTimer timer;
    QPixmap pixmap;

public:
    /**
     * 拖进事件
     * @brief dragEnterEvent
     * @param event
     */
    void dragEnterEvent(QDragEnterEvent* event);
    /**
     * 拖进放下事件
     * @brief dropEvent
     * @param event
     */
    void dropEvent(QDropEvent* event);
    void resizeEvent(QResizeEvent* event);

};
